<%@ page import="com.hrm.entity.AdminEntity" %>
<%@ page import="com.hrm.entity.EmployeeEntity" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../css/all.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function quit(){
            var flag=window.confirm("你真的要退出吗?");
            if(flag){
                window.top.location.href="${pageContext.request.contextPath}/index.jsp";
            }
        }
    </script>
</head>
<%
    Object object = session.getAttribute("user");
%>
<%--<body bgcolor="#424949  ">--%>
    <%--<div style="display: flex;justify-content: space-between;align-items: center;color:white">--%>
        <%--<div style="display: flex;justify-content: flex-start;align-items: center;">--%>
            <%--<a href="home.html" target="_parent" style="float: left;margin-left: 10px"><img src="../resources/logo.png" alt="LOGO" width="60" height="60"></a>--%>
            <%--<div style="margin-left: 20px;font-size: 1.6em">企业人事管理系统</div>--%>
        <%--</div>--%>

        <%--<div style="display: flex;justify-content: flex-start;align-items: center;color:white">--%>
            <%--<span style="padding-right: 50px;">欢迎您，<%--%>
                <%--if(object.getClass() == AdminEntity.class){--%>
                    <%--AdminEntity adminEntity = (AdminEntity) object;--%>
                    <%--out.print("管理员" + adminEntity.getId());--%>
                <%--}else if(object.getClass() == EmployeeEntity.class){--%>
                    <%--EmployeeEntity employeeEntity = (EmployeeEntity) object;--%>
                    <%--out.print(employeeEntity.getPosition() + employeeEntity.getId());--%>
                <%--}--%>
            <%--%>！</span>--%>
            <%--<a href="" onclick="quit()" style="padding-right: 40px;margin-bottom: 10px"><img src="../resources/logout.png" style="padding-top: 15px"></a>--%>
        <%--</div>--%>

    <%--</div>--%>
<%--</body>--%>
<body>
<div class="top">
    <div class="top_logo"><img src="../image/logo1.png"/> </div>
    <div class="top_right">
        <ul >
            <li><i class=" i_all i_user"></i>
                <label style="color:white">
                欢迎您，<%
                    if(object.getClass() == AdminEntity.class){
                        AdminEntity adminEntity = (AdminEntity) object;
                        out.print("管理员" + adminEntity.getId());
                    }else if(object.getClass() == EmployeeEntity.class){
                        EmployeeEntity employeeEntity = (EmployeeEntity) object;
                        out.print(employeeEntity.getPosition() + employeeEntity.getId());
                    }
                %>！
                </label>
            </li>
            </li>
            <li><i class=" i_all  i_cance"></i><a href="" onclick="quit()">注销</a></li>
        </ul>
    </div>
</div>
</body>
</html>
